#include <base/base.h>

void test_rect() {
  base::Rect rc1(0, 0, 10, 10);
  base::Rect rc2(5, 5, 10, 10);

  auto left = rc1.left();
  auto right = rc1.right();
  auto top = rc1.top();
  auto bottom = rc1.bottom();
  auto lt = rc1.left_top();
  auto lb = rc1.left_bottom();
  auto rt = rc1.right_top();
  auto rb = rc1.right_bottom();
  auto ct = rc1.center();
  auto ok = rc1.pt_in_rc(ct.x,ct.y);
  ok = rc1.pt_in_rc(rb.x,rb.y, true);
  ok = rc1.pt_in_rc(rb.x,rb.y, false);

  base::Inset inset(1,2,3,4);
  rc2.Inset(inset);

  base::Rect rc = rc1;
  rc.intersect_rect(rc2);

  rc = rc1;
  rc.union_rect(rc2);
}

int main(int argc, char **argv) {
  test_rect();
  return 0;
}